| 
                
               | 
              
                
               | 
              
                @@ -46,11 +46,10 @@ class Command(CompatibilityBaseCommand): 
               | 
            
            
            
              | 
                46
               | 
              
                46
               | 
              
                                     if logs.count() != 0: 
               | 
            
            
            
              | 
                47
               | 
              
                47
               | 
              
                                         saleclerks = SaleclerkInfo.objects.filter(brand_id=b.brand_id, distributor_id=d.distributor_id, status=True) 
               | 
            
            
            
              | 
                48
               | 
              
                48
               | 
              
                                         for saleclerk in saleclerks: 
               | 
            
            
            
              | 
                49
               | 
              
                
               | 
              
                -                            print saleclerk.clerk_id 
               | 
            
            
            
              | 
                50
               | 
              
                49
               | 
              
                                             log = logs.filter(clerk_id=saleclerk.clerk_id) 
               | 
            
            
            
              | 
                51
               | 
              
                
               | 
              
                -                            yesterday_num += logs.filter(ymd=lastday).count() 
               | 
            
            
            
              | 
                52
               | 
              
                
               | 
              
                -                            current_month += logs.filter(ym=month).count() 
               | 
            
            
            
              | 
                53
               | 
              
                
               | 
              
                -                            last_month += logs.filter(ym=lastmonth).count() 
               | 
            
            
            
              | 
                
               | 
              
                50
               | 
              
                +                            yesterday_num += log.filter(ymd=lastday).count() 
               | 
            
            
            
              | 
                
               | 
              
                51
               | 
              
                +                            current_month += log.filter(ym=month).count() 
               | 
            
            
            
              | 
                
               | 
              
                52
               | 
              
                +                            last_month += log.filter(ym=lastmonth).count() 
               | 
            
            
            
              | 
                54
               | 
              
                53
               | 
              
                  
               | 
            
            
            
              | 
                55
               | 
              
                54
               | 
              
                                     if m.is_important or (yesterday_num or current_month or last_month): 
               | 
            
            
            
              | 
                56
               | 
              
                55
               | 
              
                                         SalesResponsibilityInfoModelsSaleStatisticInfo.objects.create( 
               |